#ifndef RECEIVER_H
#define RECEIVER_H

#include <QObject>
#include <QTcpSocket>
#include <QStringList>
#include <QHostAddress>

class Receiver : public QObject
{
    Q_OBJECT
public:
    explicit Receiver(QTcpSocket* connection);
    
signals:
    /**
     * @brief scheduleMessageLog Emitted to forward message to server thread.
     */
    void scheduleMessageLog(QString);

public slots:
    /**
     * @brief receiveData Receives data sent by client.
     */
    void receiveData();

private:
    /**
     * @brief clientConnection Client connection socket kept on server.
     */
    QTcpSocket* clientConnection;
};

#endif // RECEIVER_H
